package com.dmyang.p2pchat.bean;

import java.util.Date;

/**
 * Created by brss on 2017/11/2.
 */

public class Message {
    private String ipAndPort;//作为查数据库的主键
    private Date date;
    private String nickname;
    private String content;

    public Message(String ipAndPort, Date date, String nickname, String content) {
        this.ipAndPort = ipAndPort;
        this.date = date;
        this.nickname = nickname;
        this.content = content;
    }

    public String getIpAndPort() {
        return ipAndPort;
    }

    public void setIpAndPort(String ipAndPort) {
        this.ipAndPort = ipAndPort;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "Message{" +
                "ipAndPort='" + ipAndPort + '\'' +
                ", date=" + date +
                ", nickname='" + nickname + '\'' +
                ", content='" + content + '\'' +
                '}';
    }
}
